<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>提示信息</title>
<link rel="shortcut icon" type="image/ico" href="${basePath}/favicon.ico?v=1"/>
<script type="text/javascript" src="${basePath}/js/jquery-1.8.3.min.js"></script>
<style type="text/css">
@charset "utf-8";
.tiao_content{ margin:0 auto; background:url(${basePath}/images/5_03_03.png) no-repeat;  background-position: center;height:300px; width:710px; margin-top:13%; font-family: "微软雅黑" ; color:#fefefe;}
.tiao_content1{ margin:0 auto; background:url(${basePath}/images/5-1_06.png) no-repeat;  background-position: center;height:300px; width:710px; margin-top:13%; font-family: "微软雅黑" ; color:#fefefe;}
.tiao_img{ width:200px; float:left; margin-left:60px; margin-top:40px;}
.tiao_txt{ width:400px; float:right; text-align:left; margin-right:70px; margin-top:15%;line-height:35px; }
.top_txt{ font-size:24px; }
.bot_txt{ font-size:14px; }
.bot_txt a:link {
	color: #fefefe;
}
.bot_txt a:visited {
	color: #fefefe;
}
.bot_txta:hover {
	colo r: #fefefe;
}
.bot_txt a:active {
	color: #fefefe;
}
</style>
</head>
<body style="background:#f4f4f4">
	<div class="tiao_content1">
		<div class="tiao_txt">
		<div class="top_txt">正在同步</div>
		<img src="${basePath}/images/jdt2.gif" height="20px" width="200">
		<div class="bot_txt" >		
			<span>
				<a id="href" href="${basePath}/${redirect?default('fansUser/index')}">跳转</a>
			</span>
			<span id="msgStr">正在更新</span>
			<sapn id="sync_time"></sapn>
			<span  id="time_show"></span></div></div>				
		</div>
		<script type="text/javascript">
		var sh;
		$(document).ready(function() {
			sh=setInterval(getDate,500);
			getDate();
			//clearInterval(sh);
		});
		function getDate(){
			$.ajax({
		        type:'get',
		        url:'syncCount',
		        cache:false,
		        success:function(type_json, textStatus){
	        		if(type_json.success == true){
		        		console.log(type_json.data[0].total);
		        		console.log(type_json.data[0].count);
		        		$("#sync_time").html(type_json.data[0].count+"/"+type_json.data[0].total); 
			      	}else{
						clearInterval(sh);
				    	$("#msgStr").html("更新成功,自动跳转..."); 
				    	$("#sync_time").html("");
				    	var span = 3;
						setInterval(function(){
							span = span - 1;
							$("#time_show").html(span);
							if(span == 0){
								window.location.href="${basePath}/${redirect?default('fansUser/index')}";
							}
						}, 1000);
					}
		      	}
		    });
		}
	</script>
	
</body>
</html>